home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 November / 1987-11.d64 / sketch-pad menu (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  129 lines

  1. 10 rem copyright 1987 compute! publications, inc. - all rights reserved
  2. 20 ifl>0then60
  3. 30 poke52,32:poke56,32:poke252,0:clr
  4. 40 print"[147]   copyright 1987 compute! pub., inc."
  5. 50 printtab(10)"all rights reserved"
  6. 60 gosub130
  7. 70 gosub300
  8. 80 ifcm=7then110
  9. 90 poke845,pr(1):poke846,pr(2):poke53287,pr(1):sys32768
  10. 100 goto70
  11. 110 input"[147]exit (y/n)";fc$:iffc$<>"y"then70
  12. 120 print"[147]processing complete":poke251,0:end
  13. 130 ifpeek(251)=86thenpoke839,0:goto190
  14. 140 ifl=0thenl=1:load"sketch-pad",8,1
  15. 150 ifl=1thenl=2:load"savesketch",8,1
  16. 160 ifl=2thenl=3:load"printsketch",8,1
  17. 170 forc1=1to128:readsp:poke16255+c1,sp:next
  18. 180 poke839,1:poke833,1:poke840,50
  19. 190 cm$(1)="paint color":pr(1)=0
  20. 200 cm$(2)="background color":pr(2)=14
  21. 210 cm$(3)="save sketch"
  22. 220 cm$(4)="save transfer"
  23. 230 cm$(5)="load sketch"
  24. 240 cm$(6)="load transfer"
  25. 250 cm$(7)="exit to basic"
  26. 260 ifpeek(251)<>86thencm=1
  27. 270 poke251,86
  28. 280 ba=27998:poke878,peek(ba):poke879,peek(ba+1)
  29. 290 return
  30. 300 poke53280,6:poke53281,6:print"[147][159]"
  31. 310 print""tab(15)"[144]sketch pad"
  32. 320 ifcm=0thencm=1
  33. 330 forc1=1to7:print" "
  34. 340 ifc1<3thenprinttab(20);:ford=1to16:poke646,d:print" [146]";:next:print:goto360
  35. 350 print" "
  36. 360 print"[159]";:ifc1=cmthenprint"";
  37. 370 printcm$(c1)
  38. 380 next
  39. 390 print""
  40. 400 printtab(24)"[144]f1-sketch"
  41. 410 printtab(24)"f7-print[159]"
  42. 420 gosub930
  43. 430 getfc$
  44. 440 iffc$="[133]"thenifcm=7thencm=1
  45. 450 iffc$="[133]"then920
  46. 460 iffc$="[136]"thengosub1040:goto300
  47. 470 ifpeek(56320)=127then430
  48. 480 j1=peek(56320)
  49. 490 if(j1or239)=239then630
  50. 500 if(j1or247)=247then610
  51. 510 if(j1or251)=251then580
  52. 520 if(j1or253)=253then560
  53. 530 if(j1or254)<>254then430
  54. 540 cm=cm-1:ifcm<1thencm=7
  55. 550 goto310
  56. 560 cm=cm+1:ifcm>7thencm=1
  57. 570 goto310
  58. 580 ifcm>2then430
  59. 590 pr(cm)=pr(cm)-1:ifpr(cm)<0thenpr(cm)=15
  60. 600 goto420
  61. 610 pr(cm)=pr(cm)+1:ifpr(cm)>15thenpr(cm)=0
  62. 620 goto420
  63. 630 ifcm=7then920
  64. 640 ifcm<3then430
  65. 650 print"[147]";cm$(cm);"":fc$=""
  66. 660 input"file name";fc$:iffc$=""then300
  67. 670 ifcm=3orcm=5thenfc$="sp."+left$(fc$,12)
  68. 680 ifcm=4orcm=6thenfc$="sx."+left$(fc$,12)
  69. 690 open15,8,15
  70. 700 open2,8,2,fc$+",p,r":input#15,e,e$
  71. 710 close2:close15
  72. 720 ife>0thenifcm>4then870
  73. 730 ife=0thenifcm<5then870
  74. 740 ifcm>4thenloadfc$,8,1
  75. 750 pk=17950:pokepk,(len(fc$))
  76. 760 print"saving ";fc$;""
  77. 770 ifcm=3thenba=8192:ea=ba+8000
  78. 780 ifcm=4thenba=27998:ea=ba+int((peek(878)/8)*peek(879))+10
  79. 790 bh=int(ba/256):bl=ba-(bh*256)
  80. 800 eh=int(ea/256):el=ea-(eh*256)
  81. 810 poke18030,bl:poke18034,bh:poke18038,el:poke18040,eh
  82. 820 forc1=1tolen(fc$):pokepk+c1,asc(mid$(fc$,c1,1)):next
  83. 830 ifcm=4thenpokeba,peek(878):pokeba+1,peek(879)
  84. 840 sys18000
  85. 850 ifpeek(pk)=0then300
  86. 860 print"bad save":goto880
  87. 870 printe;e$;""
  88. 880 print"press return to continue"
  89. 890 getfc$:iffc$<>""then890
  90. 900 getfc$:iffc$=""then900
  91. 910 goto300
  92. 920 return
  93. 930 print""
  94. 940 printtab(20);
  95. 950 forc1=0to15:ifc1=pr(1)thenprint"^";:goto970
  96. 960 print" ";
  97. 970 next
  98. 980 print""
  99. 990 printtab(20);
  100. 1000 forc1=0to15:ifc1=pr(2)thenprint"^";:goto1020
  101. 1010 print" ";
  102. 1020 next
  103. 1030 return
  104. 1040 print"[147]sketch print process"
  105. 1050 print"print picture l[146]-large or s[146]-small?"
  106. 1060 getfc$:iffc$<>""then1060
  107. 1070 getfc$:iffc$=""then1070
  108. 1080 iffc$="l"thenpoke49220,0:goto1110
  109. 1090 iffc$="s"thenpoke49220,1:goto1110
  110. 1100 goto1120
  111. 1110 sys49300
  112. 1120 return
  113. 1130 data0,0,0,0,0,0,0,0
  114. 1140 data0,0,0,0,0,0,0,0
  115. 1150 data0,0,0,0,0,255,128,0
  116. 1160 data160,192,0,160,224,0,160,192
  117. 1170 data0,255,128,0,0,0,0,0
  118. 1180 data0,0,0,0,0,0,0,0
  119. 1190 data0,0,0,0,0,0,0,0
  120. 1200 data0,0,0,0,0,0,0,128
  121. 1210 data0,0,0,0,0,0,0,0
  122. 1220 data0,0,0,0,0,0,0,0
  123. 1230 data0,0,0,0,0,0,3,255
  124. 1240 data0,6,5,0,14,5,0,6
  125. 1250 data5,0,3,255,0,0,0,0
  126. 1260 data0,0,0,0,0,0,0,0
  127. 1270 data0,0,0,0,0,0,0,0
  128. 1280 data0,0,0,0,0,0,0,128
  129.